/**
 * @file profess 接口实现
 * @author eabax-FE
 */
import request from '@/utils/request'
const prefix = '/global' // 这里需要修改为微服务网关的前缀

/**
 * @name 查询全部数据
 * @description 查询全部数据
 * @return
 */
export function findAllFn() {
  return request({
    url: `${prefix}/profess`,
    method: 'get'
  })
}
/**
 * @name 增加
 * @description 增加
 * @param body  profess
 * @return
 */
export function addFn(profess) {
  return request({
    url: `${prefix}/profess/add`,
    method: 'post',
    data: profess
  })
}
/**
 * @name 删除
 * @description 删除
 * @param path integer id
 * @return
 */
export function deleteFn(id) {
  return request({
    url: `${prefix}/profess/delete/${id}`,
    method: 'delete'
  })
}
/**
 * @name 根据ID查询
 * @description 根据ID查询
 * @param path integer id
 * @return
 */
export function findByIdFn(id) {
  return request({
    url: `${prefix}/profess/findById/${id}`,
    method: 'get'
  })
}
/**
 * @name 标准职称取得(返回树状)
 * @description 标准职称取得(返回树状)
 * @param body  profess
 * @return
 */
export function getProfessTreeFn(profess) {
  return request({
    url: `${prefix}/profess/getProfessTree`,
    method: 'post',
    data: profess
  })
}
/**
 * @name 根据条件查询
 * @description 根据条件查询
 * @param body  searchMap
 * @return
 */
export function findSearchFn(searchMap) {
  return request({
    url: `${prefix}/profess/search`,
    method: 'post',
    data: searchMap
  })
}
/**
 * @name 分页+多条件查询
 * @description 分页+多条件查询
 * @param body  searchMap
 * @param path integer page
 * @param path integer size
 * @return
 */
export function findSearchPageFn(searchMap, page, size) {
  return request({
    url: `${prefix}/profess/search/${page}/${size}`,
    method: 'post',
    data: searchMap
  })
}
/**
 * @name 修改
 * @description 修改
 * @param body  profess
 * @param path integer id
 * @return
 */
export function updateFn(profess, id) {
  return request({
    url: `${prefix}/profess/update/${id}`,
    method: 'put',
    data: profess
  })
}
/**
 * @name 停启用
 * @description 停启用
 * @param path integer id
 * @param path integer blnisinactive
 * @return
 */
export function updateBlnisinactiveFn(id, blnisinactive) {
  return request({
    url: `${prefix}/profess/updateBlnisinactive/${id}/${blnisinactive}`,
    method: 'get'
  })
}
